package com.gxt.riaapp.client.mvc;

import com.extjs.gxt.ui.client.event.ButtonEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.VerticalPanel;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
import com.google.gwt.user.client.Element;

public class CopyOfSmplProgram  extends LayoutContainer {
	String txt = "";
	private SelectionListener<ButtonEvent> buttonListener= new SelectionListener<ButtonEvent>() {  
		@Override  
		public void componentSelected(ButtonEvent ce) {
			
		}
	};
	public CopyOfSmplProgram(String txt) {
		this.txt = txt;
	}
	
	public CopyOfSmplProgram() {
		// TODO Auto-generated constructor stub
	}
	
	@Override
	protected void onRender(Element parent, int index) {
		// TODO Auto-generated method stub
		super.onRender(parent, index);
		VerticalPanel vp = new VerticalPanel();
		vp.setSpacing(10);
		Button btn =new Button(txt, buttonListener);
		setLayout(new FlowLayout(10));
		vp.add(btn);
		add(vp);
	}
}
